import { axiosGet, axiosPost, LogUtils, BaseData } from '@library/common'
import { RefitHeadData } from '../eitity/RefitHeadData'
import { RefitListData, RefitData } from '../eitity/RefitData'


//https://buynewcar.api.autohome.com.cn/ownerapi/refitstar/v2/getfallsfeedlist?pageindex=1&tabid=0&pagesize=20
class RefitModel {
  getRefitTopic(): Promise<BaseData<RefitHeadData>> {
    return axiosGet<RefitHeadData>('/ownerapi/refitstar/v3/hot/topic')
  }

  getRefitList(tabid: number, pageindex: number): Promise<BaseData<RefitData>> {
    return axiosGet<RefitData>('/ownerapi/refitstar/v2/getfallsfeedlist', {
      tabid,
      pageindex
    })
  }
}

const refitModel = new RefitModel()

export default refitModel as RefitModel